package com.ccloud.blog.modules.music.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 音乐主表
 * </p>
 *
 * @author chentailai
 * @since 2019-07-11
 */
@EqualsAndHashCode(callSuper = true)
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("echo_business_music")
public class Music extends Model<Music> {

    private static final long serialVersionUID = 1L;

    public Music(String name, String artist, String url, String cover, String lrc, String theme, Integer createBy) {
        this.name = name;
        this.artist = artist;
        this.url = url;
        this.cover = cover;
        this.lrc = lrc;
        this.theme = theme;
        this.createBy = createBy;
    }

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 音乐名
     */
    private String name;
    /**
     * 艺术家
     */
    private String artist;
    /**
     * 地址
     */
    private String url;
    /**
     * 封面
     */
    private String cover;
    /**
     * 歌词文件地址
     */
    private String lrc;
    /**
     * 主题
     */
    private String theme;
    /**
     * 创建人
     */
    private Integer createBy;
    /**
     * 创建时间
     */
    private Date createTime;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
